<?php
/**
 * Main Graphical user interface elements
 * 
 * @author Mykolas Jarašiūnas
 */
$page_title = htmlspecialchars($page_title);
//FIXME: normal GUI path evaluation
if (strpos($_SERVER['REQUEST_URI'], '/GUI/') !== false) {
    $prefix = '';
} else {
    $prefix = 'GUI/Design/';
    $js_prefix = 'GUI/Functions/';
}
echo '<?xml version="1.0" encoding="utf-8"?>' . "\n";

//FIXME: normal GUI path evaluation
if (strpos($_SERVER['REQUEST_URI'], '/GUI/') !== false) {
    $prefix = '';
} else {
    $prefix = 'GUI/Design/';            
    $js_prefix = 'GUI/Functions/';
    $js_plugins = 'Plugins/';
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="lt" lang="lt">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> 
        <link rel="stylesheet" href="<?= $prefix; ?>main.css" type="text/css"/>
        <link rel="stylesheet" href="Plugins/SlickGrid/slick.grid.css" type="text/css" media="screen" charset="utf-8" />
        <link rel="stylesheet" href="Plugins/SlickGrid/css/smoothness/jquery-ui-1.8.16.custom.css" type="text/css" media="screen" charset="utf-8" />

        <script src="Plugins/jquery-1.7.min.js"></script>
        
        <script src="<?= $js_prefix; ?>table.js" type="text/javascript"></script>
        <script src="<?= $js_prefix; ?>ElementsShow.js" type="text/javascript"></script>

        
        <script src="Plugins/highcharts/highcharts.js"></script>
        <script src="Plugins/bluff/js-class.js"></script>
        <script src="Plugins/bluff/excanvas.js"></script>
        <script src="Plugins/bluff/bluff-min.js"></script>
        
        <script src="Plugins/raphael-min/raphael.js"></script>
        <script src="Plugins/raphael-min/g.raphael.js"></script>
        <script src="Plugins/raphael-min/g.dot.js"></script>
        
        <script src="Plugins/SlickGrid/lib/firebugx.js"></script>

        <script src="Plugins/SlickGrid/lib/jquery-ui-1.8.16.custom.min.js"></script>
        <script src="Plugins/SlickGrid/lib/jquery.event.drag-2.0.min.js"></script>

        <script src="Plugins/SlickGrid/slick.core.js"></script>
        <script src="Plugins/SlickGrid/plugins/slick.cellrangedecorator.js"></script>
        <script src="Plugins/SlickGrid/plugins/slick.cellrangeselector.js"></script>
        <script src="Plugins/SlickGrid/plugins/slick.cellselectionmodel.js"></script>
        <script src="Plugins/SlickGrid/slick.editors.js"></script>
        <script src="Plugins/SlickGrid/slick.grid.js"></script>
        
        
        <!--[if IE]><script language="javascript" src="<?= $js_plugins; ?>bluff/excanvas.js" type="text/javascript"></script><![endif]-->

        <title><?= $page_title; ?></title>
    </head>
    <body>
        <div class="box_left">
            <div class="box_right">
                <div class="logo">
                    <div id="status"></div>
                </div>
                <div class="sidebar">
                    <?php
                    if ($tabs != "") {
                        print tabs_list_start();
                        print $tabs;
                        print tabs_list_end();
                    }
                    print $sidebar_content;
                    if ($help != "") {
                        print form_help_widget($help);
                    }
                    ?>
                </div>
                <div class="main_content">
                    <?php
                    print messages("error");
                    print messages("warning");
                    print messages("success");
                    print $main_content;
                    ?>

                </div>
                <div class="floater"></div>
            </div>
        </div>
        <div class="footer">Paramos administravimo asistentas <i>1.2 beta versija</i> | Sprendimas: <a href="mailto:gramasoft@googlegroups.com">GRAMAsoft</a> 2011.<br/><small><?= $footer; ?></small></div>
    </body>
</html>        